﻿<Window x:Class="ActiveStory.UI.ExportWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Export..." Height="330" Width="640" Icon="/ActiveStoryEnhanced;component/Content/icon.png" ResizeMode="NoResize" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" SizeToContent="Height" Loaded="Window_Loaded">
    <Window.CommandBindings>
        <CommandBinding x:Name="BrowseForDirectoryCommand" Command="ApplicationCommands.Open" Executed="BrowseForDirectoryCommand_Executed" CanExecute="BrowseForDirectoryCommand_CanExecute"></CommandBinding>
        <CommandBinding x:Name="ExportCommand" Command="ApplicationCommands.Save" Executed="ExportCommand_Executed" CanExecute="ExportCommand_CanExecute" />
    </Window.CommandBindings>
    <Grid>
        <TabControl Name="ExportTabControl">
            <TabItem Name="SilverlightWoZTabItem" Header="Export to Silverlight Wizard of Oz Tool">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="70"/>
                        <ColumnDefinition Width="30"/>
                        <ColumnDefinition Width="40"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="30" />
                    </Grid.RowDefinitions>
                    <Label Grid.Column="0" Grid.Row="0">Export to:</Label>
                    <ComboBox Name="WoZExportTypeComboBox" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" SelectedIndex="0" SelectionChanged="WoZExportTypeComboBox_SelectionChanged" TabIndex="0">
                        <ComboBoxItem IsSelected="True">Built-in Cassini ASP.NET Web Server</ComboBoxItem>
                        <ComboBoxItem>Existing ASP.NET Web Server</ComboBoxItem>
                    </ComboBox>
                    <Label Grid.Column="3" Grid.Row="0" Grid.ColumnSpan="2" HorizontalContentAlignment="Right">Startup Page:</Label>
                    <ComboBox Name="StartupPageNumberComboBox" Grid.Column="5" Grid.Row="0" TabIndex="1"></ComboBox>
                    <Label Name="WozExportDirectoryLabel" Grid.Column="0" Grid.Row="1">Export Directory:</Label>
                    <TextBox Name="WoZExportDirectoryTextBox" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="4" IsEnabled="True" TabIndex="2"></TextBox>
                    <Button Name="WoZBrowseButton" Grid.Column="5" Grid.Row="1" Command="ApplicationCommands.Open" TabIndex="3">...</Button>
                    <Expander Header="Task Instructions" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="6" Grid.RowSpan="2">
                        <TextBox Name="TaskInstructionsTextBox" AcceptsReturn="True" AcceptsTab="True" Height="135" TabIndex="4"></TextBox>
                    </Expander>
                    <!--<Label Grid.Column="0" Grid.Row="2">Task Instructions:</Label>-->
                    <!--<TextBox Name="TaskInstructionsTextBox" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="4" Grid.RowSpan="2" AcceptsReturn="True" AcceptsTab="True"></TextBox>-->
                    <Button Name="WoZExportButton" Grid.Column="3" Grid.Row="4" IsDefault="True" Command="ApplicationCommands.Save" TabIndex="5">Export</Button>
                    <Button Grid.Column="4" Grid.Row="4" Grid.ColumnSpan="2" IsCancel="True" TabIndex="6">Cancel</Button>
                </Grid>
            </TabItem>
            <TabItem Name="CurrentPageTabItem" Header="Export Current Page as Image">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="70"/>
                        <ColumnDefinition Width="30"/>
                        <ColumnDefinition Width="40"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="30" />
                    </Grid.RowDefinitions>
                    <Label Grid.Column="0" Grid.Row="0">Image Format:</Label>
                    <ComboBox Name="PageImageFormatComboBox" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"  SelectedIndex="0" TabIndex="0">
                        <ComboBoxItem IsSelected="True">Portable Network Graphics (.png)</ComboBoxItem>
                        <ComboBoxItem>CompuServe Graphics Interchange Format (.gif)</ComboBoxItem>
                        <ComboBoxItem>JPEG Image (.jpg)</ComboBoxItem>
                        <ComboBoxItem>Bitmap Image (.bmp)</ComboBoxItem>
                        <ComboBoxItem>Tagged Image File Format (.tiff)</ComboBoxItem>
                    </ComboBox>
                    <Label Grid.Column="0" Grid.Row="1">Export Directory:</Label>
                    <TextBox Name="PageExportDirectoryTextBox" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="4" TabIndex="1"></TextBox>
                    <Button Name="PageExportBrowseButton" Grid.Column="5" Grid.Row="1" Command="ApplicationCommands.Open" TabIndex="2">...</Button>
                    <Expander Header="Preview" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="6" Grid.RowSpan="2" >
                    <Image Name="PageExportPreviewImage" Stretch="Uniform" HorizontalAlignment="Center" Height="134" Source="/ActiveStoryEnhanced;component/Content/Logo.png" StretchDirection="Both"></Image>
                    </Expander>
                    <Button Name="PageExportButton" Grid.Column="3" Grid.Row="4" IsDefault="True" Command="ApplicationCommands.Save" TabIndex="3">Export</Button>
                    <Button Grid.Column="4" Grid.Row="4" Grid.ColumnSpan="2" IsCancel="True" TabIndex="4">Cancel</Button>
                </Grid>
            </TabItem>
            <TabItem Name="ExportAllImagesTabItem" Header="Export All Pages to Images">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="70"/>
                        <ColumnDefinition Width="30"/>
                        <ColumnDefinition Width="40"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="30" />
                    </Grid.RowDefinitions>
                    <Label Grid.Column="0" Grid.Row="0">Image Format:</Label>
                    <ComboBox Name="ExportAllImageFormatComboBox" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2"  SelectedIndex="0" TabIndex="0">
                        <ComboBoxItem IsSelected="True">Portable Network Graphics (.png)</ComboBoxItem>
                        <ComboBoxItem>CompuServe Graphics Interchange Format (.gif)</ComboBoxItem>
                        <ComboBoxItem>JPEG Image (.jpg)</ComboBoxItem>
                        <ComboBoxItem>Bitmap Image (.bmp)</ComboBoxItem>
                        <ComboBoxItem>Tagged Image File Format (.tiff)</ComboBoxItem>
                    </ComboBox>
                    <Label Grid.Column="0" Grid.Row="1">Export Directory:</Label>
                    <TextBox Name="ExportAllDirectoryTextBox" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="4" TabIndex="1"></TextBox>
                    <Button Name="ExportAllBrowseButton" Grid.Column="5" Grid.Row="1" Command="ApplicationCommands.Open" TabIndex="2">...</Button>
                    <Button Name="ExportAllExportButton" Grid.Column="3" Grid.Row="4" IsDefault="True" Command="ApplicationCommands.Save" TabIndex="3">Export</Button>
                    <Button Grid.Column="4" Grid.Row="4" Grid.ColumnSpan="2" IsCancel="True" TabIndex="4">Cancel</Button>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
